﻿using System;
using System.Net;

namespace WeiboSharp
{
    public class WeiboResponse : WeiboResponseBase
    {
    }

    public class WeiboResponseBase
    {
        public WeiboRequest Request { get; set; }
        /// <summary>
        /// MIME content type of response
        /// </summary>
        public string ContentType { get; set; }
        /// <summary>
        /// Length in bytes of the response content
        /// </summary>
        public long ContentLength { get; set; }
        /// <summary>
        /// Encoding of the response content
        /// </summary>
        public string ContentEncoding { get; set; }
        /// <summary>
        /// String representation of response content
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// HTTP response status code
        /// </summary>
        public HttpStatusCode StatusCode { get; set; }
        /// <summary>
        /// Description of HTTP status returned
        /// </summary>
        public string StatusDescription { get; set; }
        /// <summary>
        /// Response content
        /// </summary>
        public byte[] RawBytes { get; set; }
        /// <summary>
        /// The URL that actually responded to the content (different from request if redirected)
        /// </summary>
        public Uri ResponseUri { get; set; }
        /// <summary>
        /// Transport or other non-HTTP error generated while attempting request
        /// </summary>
        public string ErrorMessage { get; set; }
        /// <summary>
        /// The exception thrown during the request, if any
        /// </summary>
        public Exception ErrorException { get; set; }
    }
}
